<!DOCTYPE html>
<html lang="en-US">
  <head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width,initial-scale=1">
    <title>el-radio-button-dict组件 | vue-element-dict</title>
    <meta name="generator" content="VuePress 1.9.7">
    <link rel="icon" href="/vue-element-dict/favicon.ico">
    <script defer="defer" async="async" src="https://cpro.baidustatic.com/cpro/ui/cm.js"></script>
    <meta name="description" content="vue-element-dict字典包官方使用文档">
    
    <link rel="preload" href="/vue-element-dict/assets/css/0.styles.2f302933.css" as="style"><link rel="preload" href="/vue-element-dict/assets/js/app.796ae7e4.js" as="script"><link rel="preload" href="/vue-element-dict/assets/js/4.df041e95.js" as="script"><link rel="preload" href="/vue-element-dict/assets/js/19.aa88b046.js" as="script"><link rel="preload" href="/vue-element-dict/assets/js/5.a10e50db.js" as="script"><link rel="prefetch" href="/vue-element-dict/assets/js/1.9df3603b.js"><link rel="prefetch" href="/vue-element-dict/assets/js/10.55ebc9f1.js"><link rel="prefetch" href="/vue-element-dict/assets/js/11.ae1602ab.js"><link rel="prefetch" href="/vue-element-dict/assets/js/12.7a6d05ba.js"><link rel="prefetch" href="/vue-element-dict/assets/js/13.1d9a30ea.js"><link rel="prefetch" href="/vue-element-dict/assets/js/14.83cfdb89.js"><link rel="prefetch" href="/vue-element-dict/assets/js/15.c09cab0b.js"><link rel="prefetch" href="/vue-element-dict/assets/js/16.19c4ed7e.js"><link rel="prefetch" href="/vue-element-dict/assets/js/17.5c7fb955.js"><link rel="prefetch" href="/vue-element-dict/assets/js/18.b211f0fa.js"><link rel="prefetch" href="/vue-element-dict/assets/js/2.eb833b2e.js"><link rel="prefetch" href="/vue-element-dict/assets/js/20.740e71a2.js"><link rel="prefetch" href="/vue-element-dict/assets/js/21.814870f8.js"><link rel="prefetch" href="/vue-element-dict/assets/js/22.46503405.js"><link rel="prefetch" href="/vue-element-dict/assets/js/23.87118240.js"><link rel="prefetch" href="/vue-element-dict/assets/js/24.ac6635e4.js"><link rel="prefetch" href="/vue-element-dict/assets/js/25.f678ea41.js"><link rel="prefetch" href="/vue-element-dict/assets/js/26.d8cc5201.js"><link rel="prefetch" href="/vue-element-dict/assets/js/27.7078c96d.js"><link rel="prefetch" href="/vue-element-dict/assets/js/28.57b6222a.js"><link rel="prefetch" href="/vue-element-dict/assets/js/29.010701c9.js"><link rel="prefetch" href="/vue-element-dict/assets/js/30.c6e653d6.js"><link rel="prefetch" href="/vue-element-dict/assets/js/31.d1d5da99.js"><link rel="prefetch" href="/vue-element-dict/assets/js/32.6f3739df.js"><link rel="prefetch" href="/vue-element-dict/assets/js/33.d87a4b44.js"><link rel="prefetch" href="/vue-element-dict/assets/js/34.3eca72ee.js"><link rel="prefetch" href="/vue-element-dict/assets/js/35.0a8dc5d9.js"><link rel="prefetch" href="/vue-element-dict/assets/js/36.121eaca2.js"><link rel="prefetch" href="/vue-element-dict/assets/js/37.dc841a6a.js"><link rel="prefetch" href="/vue-element-dict/assets/js/38.70886628.js"><link rel="prefetch" href="/vue-element-dict/assets/js/6.10b21df8.js"><link rel="prefetch" href="/vue-element-dict/assets/js/7.b647619a.js"><link rel="prefetch" href="/vue-element-dict/assets/js/8.4a0866ed.js"><link rel="prefetch" href="/vue-element-dict/assets/js/9.9ff5451c.js">
    <link rel="stylesheet" href="/vue-element-dict/assets/css/0.styles.2f302933.css">
  </head>
  <body>
    <div id="app" data-server-rendered="true"><div class="theme-container"><header class="navbar"><div class="sidebar-button"><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" role="img" viewBox="0 0 448 512" class="icon"><path fill="currentColor" d="M436 124H12c-6.627 0-12-5.373-12-12V80c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12zm0 160H12c-6.627 0-12-5.373-12-12v-32c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12zm0 160H12c-6.627 0-12-5.373-12-12v-32c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12z"></path></svg></div> <a href="/vue-element-dict/" class="home-link router-link-active"><!----> <span class="site-name">vue-element-dict</span></a> <div class="links"><div class="search-box"><input aria-label="Search" autocomplete="off" spellcheck="false" value=""> <!----></div> <nav class="nav-links can-hide"><div class="nav-item"><a href="/vue-element-dict/" class="nav-link">
  主页
</a></div><div class="nav-item"><a href="/vue-element-dict/guide/" class="nav-link">
  指南
</a></div><div class="nav-item"><a href="https://www.npmjs.com/package/vue-element-dict" target="_blank" rel="noopener noreferrer" class="nav-link external">
  npm地址
  <span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></a></div> <!----></nav></div></header> <div class="sidebar-mask"></div> <aside class="sidebar"><nav class="nav-links"><div class="nav-item"><a href="/vue-element-dict/" class="nav-link">
  主页
</a></div><div class="nav-item"><a href="/vue-element-dict/guide/" class="nav-link">
  指南
</a></div><div class="nav-item"><a href="https://www.npmjs.com/package/vue-element-dict" target="_blank" rel="noopener noreferrer" class="nav-link external">
  npm地址
  <span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></a></div> <!----></nav>  <ul class="sidebar-links"><li><section class="sidebar-group depth-0"><p class="sidebar-heading"><span>指南</span> <!----></p> <ul class="sidebar-links sidebar-group-items"><li><a href="/vue-element-dict/guide/" class="sidebar-link">介绍</a></li><li><a href="/vue-element-dict/guide/fast/" class="sidebar-link">快速开始</a></li><li><a href="/vue-element-dict/guide/directory-structure/" class="sidebar-link">目录结构</a></li><li><a href="/vue-element-dict/guide/config/" class="sidebar-link">字典包配置</a></li></ul></section></li><li><section class="sidebar-group depth-0"><p class="sidebar-heading open"><span>普通字典组件</span> <!----></p> <ul class="sidebar-links sidebar-group-items"><li><a href="/vue-element-dict/components/el-select-dict/" class="sidebar-link">select-dict选择器</a></li><li><a href="/vue-element-dict/components/el-radio-dict/" class="sidebar-link">radio-dict单选框</a></li><li><a href="/vue-element-dict/components/el-checkbox-dict/" class="sidebar-link">checkbox-dict多选框</a></li><li><a href="/vue-element-dict/components/el-radio-button-dict/" aria-current="page" class="active sidebar-link">radio-button-dict单选框</a><ul class="sidebar-sub-headers"><li class="sidebar-sub-header"><a href="/vue-element-dict/components/el-radio-button-dict/#radio-button-dict-attributes" class="sidebar-link">Radio Button Dict Attributes</a></li><li class="sidebar-sub-header"><a href="/vue-element-dict/components/el-radio-button-dict/#radio-button-dict-events" class="sidebar-link">Radio Button Dict Events</a></li><li class="sidebar-sub-header"><a href="/vue-element-dict/components/el-radio-button-dict/#dicttype配置项" class="sidebar-link">dictType配置项</a></li><li class="sidebar-sub-header"><a href="/vue-element-dict/components/el-radio-button-dict/#disableobj配置项" class="sidebar-link">disableObj配置项</a></li></ul></li><li><a href="/vue-element-dict/components/el-checkbox-button-dict/" class="sidebar-link">checkbox-button-dict多选框</a></li><li><a href="/vue-element-dict/components/el-tabs-dict/" class="sidebar-link">tabs-dict标签页</a></li><li><a href="/vue-element-dict/components/el-tag-dict/" class="sidebar-link">tag-dict标签</a></li><li><a href="/vue-element-dict/components/el-link-dict/" class="sidebar-link">link-dict链接</a></li><li><a href="/vue-element-dict/components/el-button-dict/" class="sidebar-link">button-dict链接</a></li><li><a href="/vue-element-dict/components/el-table-colmun-dict/" class="sidebar-link">el-table-colmun-dict表格</a></li></ul></section></li><li><section class="sidebar-group depth-0"><p class="sidebar-heading"><span>树形字典组件</span> <!----></p> <ul class="sidebar-links sidebar-group-items"><li><a href="/vue-element-dict/components/el-cascader-dict/" class="sidebar-link">cascader-dict联级选项</a></li><li><a href="/vue-element-dict/components/el-tree-dict/" class="sidebar-link">tree-dict树菜单</a></li></ul></section></li><li><section class="sidebar-group depth-0"><p class="sidebar-heading"><span>其他组件</span> <!----></p> <ul class="sidebar-links sidebar-group-items"><li><a href="/vue-element-dict/components/el-cascader-new/" class="sidebar-link">cascader-new联级选项</a></li><li><a href="/vue-element-dict/components/el-tree-new/" class="sidebar-link">tree-new树菜单</a></li></ul></section></li><li><section class="sidebar-group depth-0"><p class="sidebar-heading"><span>过滤器</span> <!----></p> <ul class="sidebar-links sidebar-group-items"><li><a href="/vue-element-dict/filters/dict/" class="sidebar-link">字典过滤器</a></li><li><a href="/vue-element-dict/filters/tree-dict/" class="sidebar-link">树形字典过滤器</a></li><li><a href="/vue-element-dict/filters/other/" class="sidebar-link">其他过滤器</a></li></ul></section></li><li><section class="sidebar-group depth-0"><p class="sidebar-heading"><span>方法</span> <!----></p> <ul class="sidebar-links sidebar-group-items"><li><a href="/vue-element-dict/functions/dict/" class="sidebar-link">字典方法</a></li><li><a href="/vue-element-dict/functions/tree-dict/" class="sidebar-link">树形字典方法</a></li><li><a href="/vue-element-dict/functions/other/" class="sidebar-link">其他方法</a></li></ul></section></li></ul> </aside> <main class="page"> <div class="theme-default-content content__default"><h1 id="el-radio-button-dict组件"><a href="#el-radio-button-dict组件" class="header-anchor">#</a> el-radio-button-dict组件</h1> <p>支持el-radio-button所有配置项。</p> <div class="custom-block tip"><p class="custom-block-title">TIP</p> <p>注意：如果需要监听change事件，可使用dictChange代替</p></div> <div class="demo-block demo-components demo-" data-v-5390b29b><div class="source-bg" style="padding:24px" data-v-5390b29b><!----></div> <div class="meta" data-v-5390b29b><div class="description" data-v-5390b29b><p data-v-5390b29b><code data-v-5390b29b>dictType</code> 传递字符串类型，同时此组件可以接收el-select所有属性及事件,<code data-v-5390b29b>change</code>事件建议采用<code data-v-5390b29b>dictChange</code>代替。</p> <p data-v-5390b29b><code data-v-5390b29b>dictType</code> 传递对象类型 <code data-v-5390b29b>filters</code> 可传递数组形式，也可字符串形式，英文逗号隔开，不可以有空格</p> <p data-v-5390b29b><code data-v-5390b29b>disableObj</code> 传递对象类型, <code data-v-5390b29b>disableValue</code> 可传递数组形式，也可字符串形式，英文逗号隔开，不可以有空格</p></div> <div class="sourceCode" data-v-5390b29b><div class="language-vue extra-class" data-v-5390b29b><pre class="language-vue" data-v-5390b29b><code data-v-5390b29b><span class="token tag" data-v-5390b29b><span class="token tag" data-v-5390b29b><span class="token punctuation" data-v-5390b29b>&lt;</span>template</span><span class="token punctuation" data-v-5390b29b>&gt;</span></span>
  <span class="token tag" data-v-5390b29b><span class="token tag" data-v-5390b29b><span class="token punctuation" data-v-5390b29b>&lt;</span>div</span> <span class="token attr-name" data-v-5390b29b>class</span><span class="token attr-value" data-v-5390b29b><span class="token punctuation attr-equals" data-v-5390b29b>=</span><span class="token punctuation" data-v-5390b29b>&quot;</span>el-radio-button-dict<span class="token punctuation" data-v-5390b29b>&quot;</span></span> <span class="token attr-name" data-v-5390b29b>ref</span><span class="token attr-value" data-v-5390b29b><span class="token punctuation attr-equals" data-v-5390b29b>=</span><span class="token punctuation" data-v-5390b29b>&quot;</span>container<span class="token punctuation" data-v-5390b29b>&quot;</span></span><span class="token punctuation" data-v-5390b29b>&gt;</span></span>
    <span class="token tag" data-v-5390b29b><span class="token tag" data-v-5390b29b><span class="token punctuation" data-v-5390b29b>&lt;</span>div</span> <span class="token attr-name" data-v-5390b29b>class</span><span class="token attr-value" data-v-5390b29b><span class="token punctuation attr-equals" data-v-5390b29b>=</span><span class="token punctuation" data-v-5390b29b>&quot;</span>title<span class="token punctuation" data-v-5390b29b>&quot;</span></span><span class="token punctuation" data-v-5390b29b>&gt;</span></span>基础用法<span class="token tag" data-v-5390b29b><span class="token tag" data-v-5390b29b><span class="token punctuation" data-v-5390b29b>&lt;/</span>div</span><span class="token punctuation" data-v-5390b29b>&gt;</span></span>
    <span class="token tag" data-v-5390b29b><span class="token tag" data-v-5390b29b><span class="token punctuation" data-v-5390b29b>&lt;</span>el-radio-button-dict</span> <span class="token attr-name" data-v-5390b29b>@dictChange</span><span class="token attr-value" data-v-5390b29b><span class="token punctuation attr-equals" data-v-5390b29b>=</span><span class="token punctuation" data-v-5390b29b>&quot;</span>handdleChange<span class="token punctuation" data-v-5390b29b>&quot;</span></span> <span class="token attr-name" data-v-5390b29b>clearable</span> <span class="token attr-name" data-v-5390b29b>v-model</span><span class="token attr-value" data-v-5390b29b><span class="token punctuation attr-equals" data-v-5390b29b>=</span><span class="token punctuation" data-v-5390b29b>&quot;</span>value1<span class="token punctuation" data-v-5390b29b>&quot;</span></span> <span class="token attr-name" data-v-5390b29b>dictType</span><span class="token attr-value" data-v-5390b29b><span class="token punctuation attr-equals" data-v-5390b29b>=</span><span class="token punctuation" data-v-5390b29b>&quot;</span>PERSON_TYPE<span class="token punctuation" data-v-5390b29b>&quot;</span></span><span class="token punctuation" data-v-5390b29b>&gt;</span></span><span class="token tag" data-v-5390b29b><span class="token tag" data-v-5390b29b><span class="token punctuation" data-v-5390b29b>&lt;/</span>el-radio-button-dict</span><span class="token punctuation" data-v-5390b29b>&gt;</span></span>
    
    <span class="token tag" data-v-5390b29b><span class="token tag" data-v-5390b29b><span class="token punctuation" data-v-5390b29b>&lt;</span>div</span> <span class="token attr-name" data-v-5390b29b>class</span><span class="token attr-value" data-v-5390b29b><span class="token punctuation attr-equals" data-v-5390b29b>=</span><span class="token punctuation" data-v-5390b29b>&quot;</span>title<span class="token punctuation" data-v-5390b29b>&quot;</span></span><span class="token punctuation" data-v-5390b29b>&gt;</span></span>过滤数据<span class="token tag" data-v-5390b29b><span class="token tag" data-v-5390b29b><span class="token punctuation" data-v-5390b29b>&lt;/</span>div</span><span class="token punctuation" data-v-5390b29b>&gt;</span></span>
    <span class="token tag" data-v-5390b29b><span class="token tag" data-v-5390b29b><span class="token punctuation" data-v-5390b29b>&lt;</span>el-radio-button-dict</span> <span class="token attr-name" data-v-5390b29b>@dictChange</span><span class="token attr-value" data-v-5390b29b><span class="token punctuation attr-equals" data-v-5390b29b>=</span><span class="token punctuation" data-v-5390b29b>&quot;</span>handdleChange<span class="token punctuation" data-v-5390b29b>&quot;</span></span>  <span class="token attr-name" data-v-5390b29b>clearable</span> <span class="token attr-name" data-v-5390b29b>v-model</span><span class="token attr-value" data-v-5390b29b><span class="token punctuation attr-equals" data-v-5390b29b>=</span><span class="token punctuation" data-v-5390b29b>&quot;</span>value2<span class="token punctuation" data-v-5390b29b>&quot;</span></span> <span class="token attr-name" data-v-5390b29b>:dictType</span><span class="token attr-value" data-v-5390b29b><span class="token punctuation attr-equals" data-v-5390b29b>=</span><span class="token punctuation" data-v-5390b29b>&quot;</span>{type: <span class="token punctuation" data-v-5390b29b>'</span>PERSON_TYPE<span class="token punctuation" data-v-5390b29b>'</span>, filters: <span class="token punctuation" data-v-5390b29b>'</span>001,002<span class="token punctuation" data-v-5390b29b>'</span>}<span class="token punctuation" data-v-5390b29b>&quot;</span></span><span class="token punctuation" data-v-5390b29b>&gt;</span></span><span class="token tag" data-v-5390b29b><span class="token tag" data-v-5390b29b><span class="token punctuation" data-v-5390b29b>&lt;/</span>el-radio-button-dict</span><span class="token punctuation" data-v-5390b29b>&gt;</span></span>
    <span class="token tag" data-v-5390b29b><span class="token tag" data-v-5390b29b><span class="token punctuation" data-v-5390b29b>&lt;</span>el-radio-button-dict</span> <span class="token attr-name" data-v-5390b29b>@dictChange</span><span class="token attr-value" data-v-5390b29b><span class="token punctuation attr-equals" data-v-5390b29b>=</span><span class="token punctuation" data-v-5390b29b>&quot;</span>handdleChange<span class="token punctuation" data-v-5390b29b>&quot;</span></span>  <span class="token attr-name" data-v-5390b29b>clearable</span> <span class="token attr-name" data-v-5390b29b>v-model</span><span class="token attr-value" data-v-5390b29b><span class="token punctuation attr-equals" data-v-5390b29b>=</span><span class="token punctuation" data-v-5390b29b>&quot;</span>value3<span class="token punctuation" data-v-5390b29b>&quot;</span></span> <span class="token attr-name" data-v-5390b29b>:filterDataFun</span><span class="token attr-value" data-v-5390b29b><span class="token punctuation attr-equals" data-v-5390b29b>=</span><span class="token punctuation" data-v-5390b29b>&quot;</span>filterDataFun<span class="token punctuation" data-v-5390b29b>&quot;</span></span> <span class="token attr-name" data-v-5390b29b>dictType</span><span class="token attr-value" data-v-5390b29b><span class="token punctuation attr-equals" data-v-5390b29b>=</span><span class="token punctuation" data-v-5390b29b>&quot;</span>PERSON_TYPE<span class="token punctuation" data-v-5390b29b>&quot;</span></span><span class="token punctuation" data-v-5390b29b>&gt;</span></span><span class="token tag" data-v-5390b29b><span class="token tag" data-v-5390b29b><span class="token punctuation" data-v-5390b29b>&lt;/</span>el-radio-button-dict</span><span class="token punctuation" data-v-5390b29b>&gt;</span></span>
    
    <span class="token tag" data-v-5390b29b><span class="token tag" data-v-5390b29b><span class="token punctuation" data-v-5390b29b>&lt;</span>div</span> <span class="token attr-name" data-v-5390b29b>class</span><span class="token attr-value" data-v-5390b29b><span class="token punctuation attr-equals" data-v-5390b29b>=</span><span class="token punctuation" data-v-5390b29b>&quot;</span>title<span class="token punctuation" data-v-5390b29b>&quot;</span></span><span class="token punctuation" data-v-5390b29b>&gt;</span></span>禁用数据<span class="token tag" data-v-5390b29b><span class="token tag" data-v-5390b29b><span class="token punctuation" data-v-5390b29b>&lt;/</span>div</span><span class="token punctuation" data-v-5390b29b>&gt;</span></span>
    <span class="token tag" data-v-5390b29b><span class="token tag" data-v-5390b29b><span class="token punctuation" data-v-5390b29b>&lt;</span>el-radio-button-dict</span> <span class="token attr-name" data-v-5390b29b>@dictChange</span><span class="token attr-value" data-v-5390b29b><span class="token punctuation attr-equals" data-v-5390b29b>=</span><span class="token punctuation" data-v-5390b29b>&quot;</span>handdleChange<span class="token punctuation" data-v-5390b29b>&quot;</span></span> <span class="token attr-name" data-v-5390b29b>dictType</span><span class="token attr-value" data-v-5390b29b><span class="token punctuation attr-equals" data-v-5390b29b>=</span><span class="token punctuation" data-v-5390b29b>&quot;</span>PERSON_TYPE<span class="token punctuation" data-v-5390b29b>&quot;</span></span> <span class="token attr-name" data-v-5390b29b>clearable</span> <span class="token attr-name" data-v-5390b29b>v-model</span><span class="token attr-value" data-v-5390b29b><span class="token punctuation attr-equals" data-v-5390b29b>=</span><span class="token punctuation" data-v-5390b29b>&quot;</span>value4<span class="token punctuation" data-v-5390b29b>&quot;</span></span> <span class="token attr-name" data-v-5390b29b>:disableObj</span><span class="token attr-value" data-v-5390b29b><span class="token punctuation attr-equals" data-v-5390b29b>=</span><span class="token punctuation" data-v-5390b29b>&quot;</span>{disableValue: <span class="token punctuation" data-v-5390b29b>'</span>001,002<span class="token punctuation" data-v-5390b29b>'</span>}<span class="token punctuation" data-v-5390b29b>&quot;</span></span><span class="token punctuation" data-v-5390b29b>&gt;</span></span><span class="token tag" data-v-5390b29b><span class="token tag" data-v-5390b29b><span class="token punctuation" data-v-5390b29b>&lt;/</span>el-radio-button-dict</span><span class="token punctuation" data-v-5390b29b>&gt;</span></span>
    <span class="token tag" data-v-5390b29b><span class="token tag" data-v-5390b29b><span class="token punctuation" data-v-5390b29b>&lt;</span>el-radio-button-dict</span> <span class="token attr-name" data-v-5390b29b>@dictChange</span><span class="token attr-value" data-v-5390b29b><span class="token punctuation attr-equals" data-v-5390b29b>=</span><span class="token punctuation" data-v-5390b29b>&quot;</span>handdleChange<span class="token punctuation" data-v-5390b29b>&quot;</span></span> <span class="token attr-name" data-v-5390b29b>dictType</span><span class="token attr-value" data-v-5390b29b><span class="token punctuation attr-equals" data-v-5390b29b>=</span><span class="token punctuation" data-v-5390b29b>&quot;</span>PERSON_TYPE<span class="token punctuation" data-v-5390b29b>&quot;</span></span> <span class="token attr-name" data-v-5390b29b>:disabledDataFun</span><span class="token attr-value" data-v-5390b29b><span class="token punctuation attr-equals" data-v-5390b29b>=</span><span class="token punctuation" data-v-5390b29b>&quot;</span>disabledDataFun<span class="token punctuation" data-v-5390b29b>&quot;</span></span> <span class="token attr-name" data-v-5390b29b>clearable</span> <span class="token attr-name" data-v-5390b29b>v-model</span><span class="token attr-value" data-v-5390b29b><span class="token punctuation attr-equals" data-v-5390b29b>=</span><span class="token punctuation" data-v-5390b29b>&quot;</span>value5<span class="token punctuation" data-v-5390b29b>&quot;</span></span><span class="token punctuation" data-v-5390b29b>&gt;</span></span><span class="token tag" data-v-5390b29b><span class="token tag" data-v-5390b29b><span class="token punctuation" data-v-5390b29b>&lt;/</span>el-radio-button-dict</span><span class="token punctuation" data-v-5390b29b>&gt;</span></span>
   
    <span class="token tag" data-v-5390b29b><span class="token tag" data-v-5390b29b><span class="token punctuation" data-v-5390b29b>&lt;</span>div</span> <span class="token attr-name" data-v-5390b29b>class</span><span class="token attr-value" data-v-5390b29b><span class="token punctuation attr-equals" data-v-5390b29b>=</span><span class="token punctuation" data-v-5390b29b>&quot;</span>title<span class="token punctuation" data-v-5390b29b>&quot;</span></span><span class="token punctuation" data-v-5390b29b>&gt;</span></span>配置keyValue及赋值<span class="token tag" data-v-5390b29b><span class="token tag" data-v-5390b29b><span class="token punctuation" data-v-5390b29b>&lt;/</span>div</span><span class="token punctuation" data-v-5390b29b>&gt;</span></span>
    <span class="token tag" data-v-5390b29b><span class="token tag" data-v-5390b29b><span class="token punctuation" data-v-5390b29b>&lt;</span>el-radio-button-dict</span> <span class="token attr-name" data-v-5390b29b>@dictChange</span><span class="token attr-value" data-v-5390b29b><span class="token punctuation attr-equals" data-v-5390b29b>=</span><span class="token punctuation" data-v-5390b29b>&quot;</span>handdleChange<span class="token punctuation" data-v-5390b29b>&quot;</span></span> <span class="token attr-name" data-v-5390b29b>clearable</span> <span class="token attr-name" data-v-5390b29b>v-model</span><span class="token attr-value" data-v-5390b29b><span class="token punctuation attr-equals" data-v-5390b29b>=</span><span class="token punctuation" data-v-5390b29b>&quot;</span>value6<span class="token punctuation" data-v-5390b29b>&quot;</span></span> <span class="token attr-name" data-v-5390b29b>dictType</span><span class="token attr-value" data-v-5390b29b><span class="token punctuation attr-equals" data-v-5390b29b>=</span><span class="token punctuation" data-v-5390b29b>&quot;</span>PERSON_TYPE<span class="token punctuation" data-v-5390b29b>&quot;</span></span><span class="token punctuation" data-v-5390b29b>&gt;</span></span><span class="token tag" data-v-5390b29b><span class="token tag" data-v-5390b29b><span class="token punctuation" data-v-5390b29b>&lt;/</span>el-radio-button-dict</span><span class="token punctuation" data-v-5390b29b>&gt;</span></span>
    <span class="token tag" data-v-5390b29b><span class="token tag" data-v-5390b29b><span class="token punctuation" data-v-5390b29b>&lt;</span>el-radio-button-dict</span> <span class="token attr-name" data-v-5390b29b>@dictChange</span><span class="token attr-value" data-v-5390b29b><span class="token punctuation attr-equals" data-v-5390b29b>=</span><span class="token punctuation" data-v-5390b29b>&quot;</span>handdleChange<span class="token punctuation" data-v-5390b29b>&quot;</span></span> <span class="token attr-name" data-v-5390b29b>:keyValue</span><span class="token attr-value" data-v-5390b29b><span class="token punctuation attr-equals" data-v-5390b29b>=</span><span class="token punctuation" data-v-5390b29b>&quot;</span>true<span class="token punctuation" data-v-5390b29b>&quot;</span></span> <span class="token attr-name" data-v-5390b29b>clearable</span> <span class="token attr-name" data-v-5390b29b>v-model</span><span class="token attr-value" data-v-5390b29b><span class="token punctuation attr-equals" data-v-5390b29b>=</span><span class="token punctuation" data-v-5390b29b>&quot;</span>value7<span class="token punctuation" data-v-5390b29b>&quot;</span></span> <span class="token attr-name" data-v-5390b29b>dictType</span><span class="token attr-value" data-v-5390b29b><span class="token punctuation attr-equals" data-v-5390b29b>=</span><span class="token punctuation" data-v-5390b29b>&quot;</span>PERSON_TYPE<span class="token punctuation" data-v-5390b29b>&quot;</span></span><span class="token punctuation" data-v-5390b29b>&gt;</span></span><span class="token tag" data-v-5390b29b><span class="token tag" data-v-5390b29b><span class="token punctuation" data-v-5390b29b>&lt;/</span>el-radio-button-dict</span><span class="token punctuation" data-v-5390b29b>&gt;</span></span>
  <span class="token tag" data-v-5390b29b><span class="token tag" data-v-5390b29b><span class="token punctuation" data-v-5390b29b>&lt;/</span>div</span><span class="token punctuation" data-v-5390b29b>&gt;</span></span>
<span class="token tag" data-v-5390b29b><span class="token tag" data-v-5390b29b><span class="token punctuation" data-v-5390b29b>&lt;/</span>template</span><span class="token punctuation" data-v-5390b29b>&gt;</span></span>

<span class="token tag" data-v-5390b29b><span class="token tag" data-v-5390b29b><span class="token punctuation" data-v-5390b29b>&lt;</span>script</span><span class="token punctuation" data-v-5390b29b>&gt;</span></span><span class="token script" data-v-5390b29b><span class="token language-javascript" data-v-5390b29b>
<span class="token keyword" data-v-5390b29b>export</span> <span class="token keyword" data-v-5390b29b>default</span> <span class="token punctuation" data-v-5390b29b>{</span>
  <span class="token literal-property property" data-v-5390b29b>name</span><span class="token operator" data-v-5390b29b>:</span> <span class="token string" data-v-5390b29b>&quot;el-radio-button-dict-index&quot;</span><span class="token punctuation" data-v-5390b29b>,</span>
  <span class="token function" data-v-5390b29b>data</span><span class="token punctuation" data-v-5390b29b>(</span><span class="token punctuation" data-v-5390b29b>)</span> <span class="token punctuation" data-v-5390b29b>{</span>
    <span class="token keyword" data-v-5390b29b>return</span> <span class="token punctuation" data-v-5390b29b>{</span>
      <span class="token literal-property property" data-v-5390b29b>value1</span><span class="token operator" data-v-5390b29b>:</span> <span class="token string" data-v-5390b29b>&quot;&quot;</span><span class="token punctuation" data-v-5390b29b>,</span>
      <span class="token literal-property property" data-v-5390b29b>value2</span><span class="token operator" data-v-5390b29b>:</span> <span class="token string" data-v-5390b29b>&quot;&quot;</span><span class="token punctuation" data-v-5390b29b>,</span>
      <span class="token literal-property property" data-v-5390b29b>value3</span><span class="token operator" data-v-5390b29b>:</span> <span class="token string" data-v-5390b29b>&quot;&quot;</span><span class="token punctuation" data-v-5390b29b>,</span>
      <span class="token literal-property property" data-v-5390b29b>value4</span><span class="token operator" data-v-5390b29b>:</span> <span class="token string" data-v-5390b29b>&quot;&quot;</span><span class="token punctuation" data-v-5390b29b>,</span>
      <span class="token literal-property property" data-v-5390b29b>value5</span><span class="token operator" data-v-5390b29b>:</span> <span class="token string" data-v-5390b29b>&quot;&quot;</span><span class="token punctuation" data-v-5390b29b>,</span>
      <span class="token literal-property property" data-v-5390b29b>value6</span><span class="token operator" data-v-5390b29b>:</span> <span class="token string" data-v-5390b29b>&quot;001&quot;</span><span class="token punctuation" data-v-5390b29b>,</span>
      <span class="token literal-property property" data-v-5390b29b>value7</span><span class="token operator" data-v-5390b29b>:</span> <span class="token string" data-v-5390b29b>&quot;001&quot;</span>
    <span class="token punctuation" data-v-5390b29b>}</span>
  <span class="token punctuation" data-v-5390b29b>}</span><span class="token punctuation" data-v-5390b29b>,</span>
  <span class="token literal-property property" data-v-5390b29b>methods</span><span class="token operator" data-v-5390b29b>:</span> <span class="token punctuation" data-v-5390b29b>{</span>
    <span class="token function" data-v-5390b29b>handdleChange</span><span class="token punctuation" data-v-5390b29b>(</span><span class="token parameter" data-v-5390b29b>val</span><span class="token punctuation" data-v-5390b29b>)</span> <span class="token punctuation" data-v-5390b29b>{</span>
      console<span class="token punctuation" data-v-5390b29b>.</span><span class="token function" data-v-5390b29b>log</span><span class="token punctuation" data-v-5390b29b>(</span>val<span class="token punctuation" data-v-5390b29b>)</span>
    <span class="token punctuation" data-v-5390b29b>}</span><span class="token punctuation" data-v-5390b29b>,</span>
    <span class="token comment" data-v-5390b29b>//过滤数据</span>
    <span class="token function" data-v-5390b29b>filterDataFun</span><span class="token punctuation" data-v-5390b29b>(</span><span class="token parameter" data-v-5390b29b>list</span><span class="token punctuation" data-v-5390b29b>)</span> <span class="token punctuation" data-v-5390b29b>{</span>
      <span class="token keyword" data-v-5390b29b>return</span> list<span class="token punctuation" data-v-5390b29b>.</span><span class="token function" data-v-5390b29b>filter</span><span class="token punctuation" data-v-5390b29b>(</span><span class="token parameter" data-v-5390b29b>item</span> <span class="token operator" data-v-5390b29b>=&gt;</span> <span class="token punctuation" data-v-5390b29b>{</span>
        <span class="token keyword" data-v-5390b29b>return</span> item<span class="token punctuation" data-v-5390b29b>.</span>value <span class="token operator" data-v-5390b29b>===</span> <span class="token string" data-v-5390b29b>&quot;001&quot;</span> <span class="token operator" data-v-5390b29b>||</span> item<span class="token punctuation" data-v-5390b29b>.</span>value <span class="token operator" data-v-5390b29b>===</span> <span class="token string" data-v-5390b29b>&quot;002&quot;</span>
      <span class="token punctuation" data-v-5390b29b>}</span><span class="token punctuation" data-v-5390b29b>)</span>
    <span class="token punctuation" data-v-5390b29b>}</span><span class="token punctuation" data-v-5390b29b>,</span>
    <span class="token comment" data-v-5390b29b>//禁用数据</span>
    <span class="token function" data-v-5390b29b>disabledDataFun</span><span class="token punctuation" data-v-5390b29b>(</span><span class="token parameter" data-v-5390b29b>list</span><span class="token punctuation" data-v-5390b29b>)</span> <span class="token punctuation" data-v-5390b29b>{</span>
      <span class="token keyword" data-v-5390b29b>return</span> list<span class="token punctuation" data-v-5390b29b>.</span><span class="token function" data-v-5390b29b>map</span><span class="token punctuation" data-v-5390b29b>(</span><span class="token parameter" data-v-5390b29b>item</span> <span class="token operator" data-v-5390b29b>=&gt;</span> <span class="token punctuation" data-v-5390b29b>{</span>
        <span class="token keyword" data-v-5390b29b>return</span> <span class="token punctuation" data-v-5390b29b>{</span>
          <span class="token operator" data-v-5390b29b>...</span>item<span class="token punctuation" data-v-5390b29b>,</span>
          <span class="token literal-property property" data-v-5390b29b>disabled</span><span class="token operator" data-v-5390b29b>:</span> <span class="token operator" data-v-5390b29b>!</span><span class="token operator" data-v-5390b29b>!</span><span class="token punctuation" data-v-5390b29b>(</span>item<span class="token punctuation" data-v-5390b29b>.</span>value <span class="token operator" data-v-5390b29b>===</span> <span class="token string" data-v-5390b29b>&quot;001&quot;</span> <span class="token operator" data-v-5390b29b>||</span> item<span class="token punctuation" data-v-5390b29b>.</span>value <span class="token operator" data-v-5390b29b>===</span> <span class="token string" data-v-5390b29b>&quot;002&quot;</span><span class="token punctuation" data-v-5390b29b>)</span>
        <span class="token punctuation" data-v-5390b29b>}</span>
      <span class="token punctuation" data-v-5390b29b>}</span><span class="token punctuation" data-v-5390b29b>)</span>
    <span class="token punctuation" data-v-5390b29b>}</span>
  <span class="token punctuation" data-v-5390b29b>}</span>
<span class="token punctuation" data-v-5390b29b>}</span>
</span></span><span class="token tag" data-v-5390b29b><span class="token tag" data-v-5390b29b><span class="token punctuation" data-v-5390b29b>&lt;/</span>script</span><span class="token punctuation" data-v-5390b29b>&gt;</span></span>

<span class="token tag" data-v-5390b29b><span class="token tag" data-v-5390b29b><span class="token punctuation" data-v-5390b29b>&lt;</span>style</span> <span class="token attr-name" data-v-5390b29b>lang</span><span class="token attr-value" data-v-5390b29b><span class="token punctuation attr-equals" data-v-5390b29b>=</span><span class="token punctuation" data-v-5390b29b>&quot;</span>less<span class="token punctuation" data-v-5390b29b>&quot;</span></span> <span class="token attr-name" data-v-5390b29b>scoped</span><span class="token punctuation" data-v-5390b29b>&gt;</span></span><span class="token style" data-v-5390b29b><span class="token language-css" data-v-5390b29b>
<span class="token selector" data-v-5390b29b>.el-radio-button-dict</span><span class="token punctuation" data-v-5390b29b>{</span>
  
<span class="token punctuation" data-v-5390b29b>}</span>
</span></span><span class="token tag" data-v-5390b29b><span class="token tag" data-v-5390b29b><span class="token punctuation" data-v-5390b29b>&lt;/</span>style</span><span class="token punctuation" data-v-5390b29b>&gt;</span></span>
</code></pre></div></div></div> <div class="demo-block-control" data-v-5390b29b><i class="el-icon-caret-bottom" data-v-5390b29b data-v-5390b29b></i> <span style="display:none;" data-v-5390b29b data-v-5390b29b>显示代码</span></div></div> <!----> <h2 id="radio-button-dict-attributes"><a href="#radio-button-dict-attributes" class="header-anchor">#</a> Radio Button Dict Attributes</h2> <table><thead><tr><th style="text-align:left;">参数</th> <th style="text-align:left;">说明</th> <th style="text-align:left;">类型</th> <th style="text-align:left;">可选值</th> <th style="text-align:left;">默认值</th></tr></thead> <tbody><tr><td style="text-align:left;">dictType</td> <td style="text-align:left;">必传，传递字典的字段名，选择想要的字典数据Object类型时详看如下配置<a href="/vue-element-dict/components/el-radio-button-dict/#dicttype配置项">dictType配置项</a></td> <td style="text-align:left;">[String, Object]</td> <td style="text-align:left;">—</td> <td style="text-align:left;">—</td></tr> <tr><td style="text-align:left;">disableObj（0.0.7及以上版本）</td> <td style="text-align:left;">选填，配置<a href="/vue-element-dict/components/el-radio-button-dict/#disableobj配置项">disableObj配置项</a></td> <td style="text-align:left;">Object</td> <td style="text-align:left;">—</td> <td style="text-align:left;">false</td></tr> <tr><td style="text-align:left;">keyValue</td> <td style="text-align:left;">选填，默认false false时dictChange事件只返回值，true返回value及label</td> <td style="text-align:left;">Boolean</td> <td style="text-align:left;">—</td> <td style="text-align:left;">false</td></tr> <tr><td style="text-align:left;">filterDataFun</td> <td style="text-align:left;">组件过滤数据方法函数 接收该字典类型的数据 默认不变  能够覆盖字典包配置里的filterDataFun</td> <td style="text-align:left;">Function</td> <td style="text-align:left;">—</td> <td style="text-align:left;">(list) =&gt; { return list }</td></tr> <tr><td style="text-align:left;">disabledDataFun</td> <td style="text-align:left;">组件禁用数据方法函数 接收该字典类型的数据 默认不变 能够覆盖字典包配置里的disabledDataFun</td> <td style="text-align:left;">Function</td> <td style="text-align:left;">—</td> <td style="text-align:left;">(list) =&gt; { return list }</td></tr></tbody></table> <h2 id="radio-button-dict-events"><a href="#radio-button-dict-events" class="header-anchor">#</a> Radio Button Dict Events</h2> <table><thead><tr><th style="text-align:left;">参数</th> <th style="text-align:left;">说明</th> <th style="text-align:left;">回调参数</th></tr></thead> <tbody><tr><td style="text-align:left;">dictChange</td> <td style="text-align:left;">选中值发生变化时触发</td> <td style="text-align:left;">keyValue为false时返回值，为true时返回键值对象</td></tr></tbody></table> <h2 id="dicttype配置项"><a href="#dicttype配置项" class="header-anchor">#</a> dictType配置项</h2> <table><thead><tr><th style="text-align:left;">参数</th> <th style="text-align:left;">说明</th> <th style="text-align:left;">类型</th> <th style="text-align:left;">可选值</th> <th style="text-align:left;">默认值</th></tr></thead> <tbody><tr><td style="text-align:left;">type</td> <td style="text-align:left;">必传，字典类型</td> <td style="text-align:left;">String</td> <td style="text-align:left;">—</td> <td style="text-align:left;">—</td></tr> <tr><td style="text-align:left;">filters</td> <td style="text-align:left;">必传，过滤数据（数组,或者字符串用英文逗号隔开）将选项过滤部分数据，使其不展示</td> <td style="text-align:left;">[String，Array]</td> <td style="text-align:left;">—</td> <td style="text-align:left;">—</td></tr> <tr><td style="text-align:left;">filterType</td> <td style="text-align:left;">过滤的字段（通过这个字段筛选数据）, 默认字典配置的 dict-setting中format的value配置项</td> <td style="text-align:left;">String</td> <td style="text-align:left;">—</td> <td style="text-align:left;">默认字典配置的 dict-setting中format的value配置项</td></tr> <tr><td style="text-align:left;">reverse</td> <td style="text-align:left;">是否反向筛选</td> <td style="text-align:left;">Boolean</td> <td style="text-align:left;">true</td> <td style="text-align:left;">false</td></tr></tbody></table> <h2 id="disableobj配置项"><a href="#disableobj配置项" class="header-anchor">#</a> disableObj配置项</h2> <table><thead><tr><th style="text-align:left;">参数</th> <th style="text-align:left;">说明</th> <th style="text-align:left;">类型</th> <th style="text-align:left;">可选值</th> <th style="text-align:left;">默认值</th></tr></thead> <tbody><tr><td style="text-align:left;">disableValue</td> <td style="text-align:left;">禁用数据（数组,或者字符串用英文逗号隔开）</td> <td style="text-align:left;">[String，Array]</td> <td style="text-align:left;">—</td> <td style="text-align:left;">—</td></tr> <tr><td style="text-align:left;">disableType</td> <td style="text-align:left;">过滤的字段（通过这个字段筛选数据）, 默认字典配置的 dict-setting中format的value配置项</td> <td style="text-align:left;">String</td> <td style="text-align:left;">—</td> <td style="text-align:left;">默认字典配置的 dict-setting中format的value配置项</td></tr> <tr><td style="text-align:left;">reverse</td> <td style="text-align:left;">是否反向筛选</td> <td style="text-align:left;">Boolean</td> <td style="text-align:left;">true</td> <td style="text-align:left;">false</td></tr></tbody></table></div> <footer class="page-edit"><!----> <div class="last-updated"><span class="prefix">上次更新:</span> <span class="time">6/29/2022, 3:01:11 PM</span></div></footer> <div class="page-nav"><p class="inner"><span class="prev">
      ←
      <a href="/vue-element-dict/components/el-checkbox-dict/" class="prev">
        checkbox-dict多选框
      </a></span> <span class="next"><a href="/vue-element-dict/components/el-checkbox-button-dict/">
        checkbox-button-dict多选框
      </a>
      →
    </span></p></div> </main></div><div class="global-ui"><div id="loading-mask"><div class="loading-wrapper"><span class="loading-dot loading-dot-spin"><i></i> <i></i> <i></i> <i></i></span></div></div><!----></div></div>
    <script src="/vue-element-dict/assets/js/app.796ae7e4.js" defer></script><script src="/vue-element-dict/assets/js/4.df041e95.js" defer></script><script src="/vue-element-dict/assets/js/19.aa88b046.js" defer></script><script src="/vue-element-dict/assets/js/5.a10e50db.js" defer></script>
  </body>
</html>
